package com.intranet.fund.dao;

import org.springframework.stereotype.Repository;

import com.intranet.fund.domain.Visitors;
import com.water.dao.BaseDao;
import com.water.dao.Page;
@Repository
public class VisitorsDao extends BaseDao<Visitors>{

	public Page queryVisitorsList(int pageNo, int pageSize,String param) {
		StringBuffer sb = new StringBuffer();
		sb.append("from Visitors where 1=1");
		if(param!=null && !param.equals("")){
			sb.append(" and (ip like '%"+param+"%' or osName like '%"+param+"%' or agent like '%"+param+"%' or accessTime like '%"+param+"%')");
		}
		sb.append(" order by accessTime desc");
		return pagedQuery(sb.toString(), pageNo, pageSize);
	}
}
